#include<bits/stdc++.h>
using namespace std;
int n,k;
long double per[1000011][2],suf[1000011][2];
long double P[1000011];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	freopen("sleep.in","r",stdin);
	freopen("sleep.out","w",stdout);
	cin >> n >> k;
	for(int i = 1;i <= n;i++)
	{
		int x,y;
		cin >> x >> y;
		P[i] = ((long double)x) / y;
	}
	sort(P + 1,P + n + 1);
	per[0][0] = 1;
	for(int i = 1;i <= n;i++)
	{
		per[i][0] = per[i - 1][0] * (1 - P[i]);
		per[i][1] = (per[i - 1][1] + per[i - 1][0]) * P[i];
	}
	suf[n + 1][0] = suf[n + 1][1] = 1;
	for(int i = n;i;i--)
	{
		suf[i][0] = suf[i + 1][0] * (1 - P[i]) + suf[i + 1][1] * P[i];
		suf[i][1] = suf[i + 1][1] * P[i];
	}
	long double res = 0;
	for(int i = 0;i <= k;i++)
	{
		int a = i,b = n - (k - a) + 1;
		res = max(res,per[a][0] * suf[b][0] + per[a][1] * suf[b][1]);
	}
	cout << fixed << setprecision(9) << (1 - res) << "\n";
	return 0;
}